package util;

import javax.swing.ButtonGroup;
import javax.swing.ButtonModel;

/**
 * A ButtonGroup that allows none of the buttons to be selected
 */
public class NoSelectionButtonGroup extends ButtonGroup {

  @Override
  public void setSelected(ButtonModel model, boolean selected) {
    if (selected) {
      super.setSelected(model, selected);
    } else {
      clearSelection();
    }
  }

}